immutable variables, the value can be set at runtime. Refer to the
following code:
// SPDX-License-Identifier: Some Identifier
pragma solidity ^0.8.10;
contract FixedValue {
string constant name = “some name”;
uint immutable maxValue;
constructor(uint value) {
maxValue = value;
}
}
2.5.11 Operators in Solidity
In most of the languages, we often have to use different operators to
do the calculations, processing, and implementation of different
business logics as per the requirement. Solidity supports the
following types of operators:
Arithmetic Operators
Relational Operators
Logical Operators
Assignment Operators
Conditional Operators
Let’s have a look at all the operators one by one.
2.5.11.1 Arithmetic Operator
The Arithmetic operators are perhaps the most widely used
operators in any programming language and are the basic
requirement of any mathematical calculation.
Solidity supports the following arithmetic operators, as shown in
Table 2.1, as follows:
OPERATOR
DENOTATION
DESCRIPTION